package com.tanhua.model.enums;

public enum Level
 	    {
 	    	 LOW("初级",1),MID("中级",2),TOP("高级",3),;
 	    	 private Level(String name,int index)
  	        {
  	            this.name=name;
  	            this.index=index;
  	        }//是对应上面的组合
 	    	 
 	    	 private String name;
 	        private int index;
 	        //构造方法
 	       
 	       public int getIndex() {
 	            return index;
 	        }
 	        public void setIndex(int index) {
 	            this.index = index;
 	        }
 	        public String getName() {
 	            return name;
 	        }
 	        public void setName(String Name) {
 	            this.name = name;
 	        }
 	       public static String getname(int index){
 	            for (Level c : Level.values()) {
 	                if(c.getIndex()==index){
 	                    return c.getName();
 	                }
 	            }
 	            return "";
 	        }
 	       
 	       
 	   } 
